package com.express.bean;

import java.sql.Timestamp;
import java.util.Objects;

/**
 * @Author: laixiangdong
 * @Date 2020/12/08
 */
public class Courier {
    private int id;
    private String userName;
    private String password;
    private String cardId;
    private String userPhone;
    private Timestamp loginTime;
    private Timestamp createTime;
    private int expressNumber;

    public int getExpressNumber() {
        return expressNumber;
    }

    public void setExpressNumber(int expressNumber) {
        this.expressNumber = expressNumber;
    }

    public Courier(String userName, String password, String cardId, String userPhone, String loginIp) {
        this.userName = userName;
        this.password = password;
        this.cardId = cardId;
        this.userPhone = userPhone;
    }

    public Courier(int id, String userName, String password, String cardId, String userPhone, Timestamp loginTime, Timestamp createTime, String loginIp) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.cardId = cardId;
        this.userPhone = userPhone;
        this.loginTime = loginTime;
        this.createTime = createTime;
    }

    public Courier() {
    }

    public Courier(String userName, String password, String cardId, String userPhone) {
        this.userName = userName;
        this.password = password;
        this.cardId = cardId;
        this.userPhone = userPhone;
    }

    public Courier(int id, String userName, String password, String userPhone, Timestamp loginTime, Timestamp createTime, int expressNumber, String cardId) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.userPhone = userPhone;
        this.loginTime = loginTime;
        this.createTime = createTime;
        this.expressNumber = expressNumber;
        this.cardId = cardId;
    }

    @Override
    public String toString() {
        return "Courier{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", cardId='" + cardId + '\'' +
                ", userPhone='" + userPhone + '\'' +
                ", loginTime=" + loginTime +
                ", createTime=" + createTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return getId() == courier.getId() &&
                Objects.equals(getUserName(), courier.getUserName()) &&
                Objects.equals(getPassword(), courier.getPassword()) &&
                Objects.equals(getCardId(), courier.getCardId()) &&
                Objects.equals(getUserPhone(), courier.getUserPhone()) &&
                Objects.equals(getLoginTime(), courier.getLoginTime()) &&
                Objects.equals(getCreateTime(), courier.getCreateTime());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getUserName(), getPassword(), getCardId(), getUserPhone(), getLoginTime(), getCreateTime());
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public Timestamp getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

}
